package com.ruoyi.project.infoprojecttargetscore.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.project.infoprojecttargetscore.domain.InfoProjectTargetScore;
import com.ruoyi.project.infoprojecttargetscore.mapper.InfoProjectTargetScoreMapper;
import com.ruoyi.project.infoprojecttargetscore.service.IInfoProjectTargetScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 目标审核-项目打分Service业务层处理
 *
 * @author ruoyi
 * @date 2022-02-14
 */
@Service
public class InfoProjectTargetScoreServiceImpl implements IInfoProjectTargetScoreService {
    @Autowired
    private InfoProjectTargetScoreMapper infoProjectTargetScoreMapper;

    /**
     * 查询目标审核-项目打分
     *
     * @param id 目标审核-项目打分主键
     * @return 目标审核-项目打分
     */
    @Override
    public InfoProjectTargetScore selectInfoProjectTargetScoreById(Long id) {
        return infoProjectTargetScoreMapper.selectInfoProjectTargetScoreById(id);
    }

    /**
     * 查询目标审核-项目打分列表
     *
     * @param infoProjectTargetScore 目标审核-项目打分
     * @return 目标审核-项目打分
     */
    @Override
    public List<InfoProjectTargetScore> selectInfoProjectTargetScoreList(InfoProjectTargetScore infoProjectTargetScore) {
        return infoProjectTargetScoreMapper.selectInfoProjectTargetScoreList(infoProjectTargetScore);
    }

    /**
     * 新增目标审核-项目打分
     *
     * @param infoProjectTargetScore 目标审核-项目打分
     * @return 结果
     */
    @Override
    public int insertInfoProjectTargetScore(InfoProjectTargetScore infoProjectTargetScore) {
        infoProjectTargetScore.setCreateTime(DateUtils.getNowDate());
        return infoProjectTargetScoreMapper.insertInfoProjectTargetScore(infoProjectTargetScore);
    }

    /**
     * 修改目标审核-项目打分
     *
     * @param infoProjectTargetScore 目标审核-项目打分
     * @return 结果
     */
    @Override
    public int updateInfoProjectTargetScore(InfoProjectTargetScore infoProjectTargetScore) {
        return infoProjectTargetScoreMapper.updateInfoProjectTargetScore(infoProjectTargetScore);
    }

    /**
     * 批量删除目标审核-项目打分
     *
     * @param ids 需要删除的目标审核-项目打分主键
     * @return 结果
     */
    @Override
    public int deleteInfoProjectTargetScoreByIds(Long[] ids) {
        return infoProjectTargetScoreMapper.deleteInfoProjectTargetScoreByIds(ids);
    }

    /**
     * 删除目标审核-项目打分信息
     *
     * @param id 目标审核-项目打分主键
     * @return 结果
     */
    @Override
    public int deleteInfoProjectTargetScoreById(Long id) {
        return infoProjectTargetScoreMapper.deleteInfoProjectTargetScoreById(id);
    }
}
